package com.heima.utils.thread;

import com.heima.model.user.pojos.ApUser;

public class AppThreadLocalUtils {

    public static ThreadLocal<ApUser> AP_USER_THREAD_LOCAL=new ThreadLocal<>();

    //添加
    public static void setUser(ApUser apUser){
        AP_USER_THREAD_LOCAL.set(apUser);
    }
    //获取
    public static ApUser getUser(){
        return AP_USER_THREAD_LOCAL.get();
    }
    //清除
    public static void remove(){
        AP_USER_THREAD_LOCAL.remove();
    }
}
